export default class Page{
    currentPage:number
    total:number
    pageSize:number
    totalPage:number
    list?:Array<any>
    constructor(total:number,currentPage=1,pageSize=10){
        this.currentPage =currentPage
        this.pageSize =pageSize
        this.total = total
        this.totalPage=Math.floor((this.total+this.pageSize-1)/this.pageSize)
    }
    get startIndex(){
        return (this.currentPage-1)*this.pageSize
    }

} 